package com.xqboss.apps.service.user;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.xqboss.apps.domain.user.UserAssetWrench;
import com.xqboss.apps.domain.user.UserIdentityRank;
import com.xqboss.apps.domain.user.UserWrenchProductionRecord;
import com.xqboss.apps.dto.user.UserWrenchProductionRecordListDto;
import com.xqboss.apps.mapper.user.UserAssetWrenchMapper;
import com.xqboss.apps.mapper.user.UserWrenchProductionRecordMapper;
import com.xqboss.apps.service.user.UserWrenchProductionRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import com.xqboss.chain.domain.chain.dto.BaseRequest;
import java.util.List;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 木鱼
 * @since 2024-01-09
 */
@Service
@Slf4j
@RequiredArgsConstructor
public class UserWrenchProductionRecordService extends ServiceImpl<UserWrenchProductionRecordMapper, UserWrenchProductionRecord> {
    @Autowired
    private UserAssetWrenchMapper userAssetWrenchMapper;
//    public List<UserWrenchProductionRecord> selectBasicList(BaseRequest request) {
//        return baseMapper.selectList(Wrappers.<UserWrenchProductionRecord>lambdaQuery());
//    }
//
//    public UserWrenchProductionRecord selectByIdBasic(Long id) {
//        return baseMapper.selectById(id);
//    }
//
//    public boolean saveBasic(UserWrenchProductionRecord record) {
//        return baseMapper.insert(record) > 0;
//    }
//
//    public boolean updateBasic(UserWrenchProductionRecord record) {
//        return baseMapper.updateById(record) > 0;
//    }
//
//    public boolean removeBasic(Long id) {
//        return baseMapper.deleteById(id) > 0;
//    }

    /**
     * 获取扳手生产记录
     * @param dto
     * @return
     */
    public List<UserWrenchProductionRecord> getList(UserWrenchProductionRecordListDto dto) {
        dto.startPage();
        return userAssetWrenchMapper.getList(dto);
    }

}